package com.bird.controller;

import com.bird.DTO.User;
import com.bird.send.SendMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @data 2021/9/12 16:23
 * @author: bird
 * @description: rabbitmq
 */
@RequestMapping(value = "/rabbitmq")
@Slf4j
@RestController
public class RabbitmqController {


    @Autowired
    private SendMessage sendMessage;


    @PostMapping(value = "/send-message")
    public String sendMessage(@RequestBody User user) {
        return sendMessage.sendMessage(user);

    }

}
